package com.my.blog.myblog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@TableName(value = "t_log")
public class Log {
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    @TableField(value = "userType")
    private String userType;

    @TableField(value = "ip")
    private String ip;

    @TableField(value = "description")
    private String description;

    @TableField(value = "param")
    private String param;

    @TableField(value = "addTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime addTime;

    public static final String COL_ID = "id";

    public static final String COL_USERTYPE = "userType";

    public static final String COL_IP = "ip";

    public static final String COL_DESCRIPTION = "description";

    public static final String COL_PARAM = "param";

    public static final String COL_ADDTIME = "addTime";
}